<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
	<meta charset="UTF-8">
	<title>课程目标达成度计算平台</title>
	<link rel="stylesheet" th:href="@{/plug/element-ui/theme-chalk/index.css}" />
	<link rel="stylesheet" th:href="@{/css/index.css}" />
	<script th:src="@{/plug/vue/vue.js}"></script>
	<script th:src="@{/plug/axios/axios.min.js}"></script>
	<script th:src="@{/plug/axios/request.js}"></script>
	<script th:src="@{/plug/element-ui/index.js}"></script>
	<script th:src="@{/js/index.js}"></script>
	<link rel="shortcut icon" th:href="@{/favicon.ico}">
</head>

<body>
	<div id="mainApp">
		<!-- 系统整体页面布局 -->
		<el-container class="elel-container">
			<!-- 页面头部区域 高度默认60px -->
			<el-header class="elel-header">
				<!-- 应用名称 -->
				<span>课程目标达成度计算平台</span>
				<!--<el-dropdown>
			        <i class="el-icon-caret-bottom" style="margin-right: 15px">管理员</i>
			        <el-dropdown-menu slot="dropdown">
			          <el-dropdown-item>个人中心</el-dropdown-item>
			          <el-dropdown-item>退出</el-dropdown-item>
			        </el-dropdown-menu>
			      </el-dropdown>-->
			</el-header>
			<el-container>
				<!-- 左侧菜单栏部分 -->
				<el-aside class="elel-aside">
					<el-scrollbar>
						<el-menu :default-openeds="['admin']" :default-active="activeMenu" :unique-opened="true"
							class="elel-menu" @select="selectMenu">
							<el-submenu index="admin">
								<template slot="title"><i class="el-icon-s-help"></i>后台管理</template>
								<!--<el-menu-item-group title="分组2">
				          <el-menu-item index="1-3">选项3</el-menu-item>
				        </el-menu-item-group>-->
								<el-menu-item index="/info">管理员信息</el-menu-item>
								<el-menu-item index="/course">课程信息管理</el-menu-item>
								<el-menu-item index="/students">学生信息管理</el-menu-item>
								<el-menu-item index="/paper">命题管理</el-menu-item>
								<el-menu-item index="/mark">成绩管理</el-menu-item>
								<el-menu-item index="/appraise">过程考核管理</el-menu-item>
								<el-menu-item index="/target">目标达成度</el-menu-item>
								<el-menu-item index="/logout">退出登陆</el-menu-item>
							</el-submenu>
						</el-menu>
					</el-scrollbar>
				</el-aside>
				<!-- 右侧主题页面内容展示 -->
				<el-main class="elel-mian">
					<!-- 路由页面 -->
					<el-row layout:fragment="fragment_body"></el-row>
				</el-main>
			</el-container>
		</el-container>
	</div>
	<script>
		const mainApp = {
            el: '#mainApp',
            data: {
                activeMenuGroup: 'admin',
				activeMenu: '',
            },
            mounted() {
				var pss = window.location.pathname.split('/');
				this.activeMenuGroup = pss[pss.length - 2]
				this.activeMenu = '/' + pss[pss.length - 1]
			},
			methods: {
				selectMenu(key, keyPath) {
					window.location.href = window.location.origin + '/' + keyPath[0] + keyPath[1]
				}
			}
        }
	</script>
	<th:block layout:fragment="fragment_script"></th:block>
</body>

</html>